package com.xncoding.freemarker.base;

import lombok.Getter;
import org.springframework.http.HttpStatus;
/**
 * idcoed:2025021116
 */
@Getter
public enum UserErrorCode implements BaseErrorCode {
    /**
     * 用户未被授权
     */
    USER_UNAUTHORIZED("101001", HttpStatus.UNAUTHORIZED, "未被授权"),
    /**
     * 用户权限不足
     */
    USER_FORBIDDEN("101002", HttpStatus.FORBIDDEN, "权限不足"),
    /**
     * 超过接口使用次数
     */
    EXCEEDED_API_USAGE_TIMES("101003", HttpStatus.FORBIDDEN, "超过接口使用次数"),
    /**
     * token已过期
     */
    TOKEN_HAS_EXPIRED("101004", HttpStatus.FORBIDDEN, "token已过期"),
    /**
     * token不支持
     */
    TOKEN_DOES_NOT_SUPPORT("101005", HttpStatus.FORBIDDEN, "token不支持"),
    /**
     * token格式不对
     */
    BAD_Token_Format("101006", HttpStatus.FORBIDDEN, "token格式不对"),
    /**
     * token签名不对
     */
    BAD_TOKEN_SIGNATURE("101007", HttpStatus.FORBIDDEN, "token签名不对"),
    /**
     * token格式转换错误
     */
    TOKEN_FORMAT_CONVERSION_ERROR("101008", HttpStatus.FORBIDDEN, "token格式转换错误"),
    /**
     * 无效token
     */
    INVALID_TOKEN("101009", HttpStatus.FORBIDDEN, "无效token"),
    ;


    private final String code;

    private final HttpStatus status;

    private final String value;

    UserErrorCode(String code, HttpStatus status, String value) {
        this.code = code;
        this.status = status;
        this.value = value;
    }
}
